﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register TagPrefix="common" TagName="header" Src="~/header.ascx" %>
<%@ Register TagPrefix="common" TagName="footer" Src="~/footer.ascx" %>
<%@ Import Namespace="System.Data" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>超敏仪器</title>
    <link href="assets/css/global.css" rel="stylesheet" />
    <script type="text/javascript" src="/assets/javascript/jquery-1.5.1.min.js"></script>
            <script type="text/javascript">
                $(document).ready(function () {
                    var i = 1;
                    var time = 4000;
                    var bannerTabs = $('#bannerTabs ul li');
                    var t;

                    bannerTabs.each(function () {
                        $(this).click(function () {
                            $(this).addClass('tabBgCurrent').siblings().removeClass('tabBgCurrent');
                            var px = $(this).index() * -995;
                            $('#banner').animate({ marginLeft: px+'px' });
                        });
                        $(this).mousemove(function () {
                            if (t) {
                                clearInterval(t);
                            }
                        });
                        $(this).mouseout(function () {
                            t = setInterval(function () {
                                $(bannerTabs[i]).trigger('click');
                                if (i == 4) {
                                    i = 0;
                                } else {
                                    i++;
                                }
                            }, 4000);
                        })
                    });

                    

                    $('#weixinBtn').mousemove(function () {
                        $("#weixin").show();
                    });
                    $('#weixinBtn').mouseleave(function () {
                        $("#weixin").hide();
                    });

                    auto();
                    function auto(){
                       t = setInterval(function () {
                            $(bannerTabs[i]).trigger('click');
                            if (i == 4) {
                                i = 0;
                            } else {
                                i++;
                            }
                        }, 4000);
                    }
                    
                });

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <common:header runat="server"></common:header>
    <div id="banners">
        <div id="banner">
            <a href="/product.aspx"><img src="/assets/images/banner1.jpg" /></a>
            <a href="/product.aspx"><img src="/assets/images/banner2.jpg" /></a>
            <a href="/product.aspx"><img src="/assets/images/banner3.jpg" /></a>
            <a href="/product.aspx"><img src="/assets/images/banner4.jpg" /></a>
            <a href="/product.aspx"><img src="/assets/images/banner5.jpg" /></a>
        </div>
    </div>
    <div id="bannerTabs">
        <ul>
            <li class="tabBgCurrent">放射性检测仪器</li>
            <li>通道式系列产品</li>
            <li>成像式辐射检测设备产品</li>
            <li>放射源及放射性废弃物安全管理产品</li>
            <li>去污、消洗、防护装备</li>
        </ul>
    </div>
	
    <div id="boxWrap" style="overflow-x:hidden;">
    	<div class="indexNewsBoxWrap boxBorders">
        	<dl>
                <dt>热销产品排行榜</dt>
                <% foreach( DataRow dr in tops.Rows){ %>
                <dd><a href="/product_detail.aspx?id=<%=dr["id"] %>" target="_blank"><%=dr["model"] %> <%=dr["name"] %></a></dd>
                <%} %>
            </dl>
        </div>
        <div class="indexNewsBoxWrap boxBorders">
        	<dl>
                <dt>解决方案
                </dt>
                <% for(int j=0; j<dt.Rows.Count; j++){ %>
                <dd class="list"><a href="/solution_detail.aspx?id=<%=dt.Rows[j]["id"] %>" target="_blank"><%=dt.Rows[j]["subject"] %></a></dd>
                <% } %>
            </dl>
        </div>
        <div class="indexNewsBoxWrap clearMarginRight" style="text-align:right;">
       	  <img src="/assets/images/index-contact.jpg" border="0" usemap="#Map" />
<map name="Map">
  <area shape="rect" coords="11,101,173,121" href="tencent://message/?uin=2662186827&Site=www.supersense.cc&Menu=yes">
  <area shape="rect" coords="10,129,172,149" href="tencent://message/?uin=3032615438&Site=www.supersense.cc&Menu=yes">
  <area shape="rect" coords="10,156,172,176" href="tencent://message/?uin=3032577942&Site=www.supersense.cc&Menu=yes">
</map>
            <div style="background:url('/assets/images/site.jpg') no-repeat;height:39px;position:relative;overflow:visible;">
                <a style="display:block;width:30px;height:39px;float:left;margin-left:80px;" target="_blank" href="http://weibo.com/chaominyiqi"></a>
      
                <a style="display:block;width:30px;height:39px;float:left;margin-left:10px;cursor:pointer;" id="weixinBtn"></a>
                <div class="weixin" id="weixin" style="position:absolute;left:155px;top:-85px;z-index:99;display:none;">
                    <img src="/assets/images/weixin.jpg" width="130" />
                </div>
            </div>
      </div>
    </div>
    <% for (int k = 0; k < productCategory.Rows.Count; k++)
       { %>
        <% if (productCategory.Rows[k]["id"].ToString() != "5")
           { %>
    <div class="indexCommonTitle">
        <strong><%=productCategory.Rows[k]["name"].ToString()%></strong>
        <span class="box_r indexCommonMore"><a href="/product.aspx?type=<%=productCategory.Rows[k]["id"].ToString()%>" style="width:55px;height:20px;display:block;"></a></span>
    </div>

    <div class="indexProductWrap">
        <ul>
            <% if (ds[k] != null)
               { %>
            <% for (int x = 0; x < ds[k].Rows.Count; x++)
               { %>
            <li><a href="/product_detail.aspx?id=<%=ds[k].Rows[x]["id"]%>" target="_blank"><img src="<%=ds[k].Rows[x]["img"].ToString().Trim()%>" border="0" /></a>
                <p style="overflow:hidden;" title="<%=ds[k].Rows[x]["name"]%>">名称：<%=ds[k].Rows[x]["name"]%></p>
                <p class="models">型号：<%=ds[k].Rows[x]["model"]%></p>
                <% if( Convert.ToInt32(ds[k].Rows[x]["is_new"]) == 1 ){ %>
                <i style="background:url('/assets/images/flag1.png') no-repeat;position:absolute;right:-5px;top:-5px;width:47px;height:48px;display:block;"></i>
                <% }
                   else if (Convert.ToInt32(ds[k].Rows[x]["is_new"]) == 2)
                   { %>
                <i style="background:url('/assets/images/flag2.png') no-repeat;position:absolute;right:-5px;top:-5px;width:47px;height:48px;display:block;"></i>
                <%}else{ %>
                <%} %>
            </li>
            <% } %>
            <% } %>
        </ul>
    </div>
    <div class="clear"></div>
    <% }
       } %>
    <common:footer runat="server"></common:footer>
    </form>

</body>
</html>
